home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-03
/
chain11.zip
/
CHAIN11.DOC
< prev
Wrap
Text File
|
1992-08-26
|
5KB
|
120 lines
CHAIN v1.0
Description:
This program generates a user definable chain as a declared object
(indivdual link) or a composite (whole chain). It also generates a
scene to display the chain in. While the POV files are being
generated, a line drawing of a link is drawn to show what it looks like
without having to render one. For POVRay 1.0 (p.k.a. DKB) Ray-Tracing
program.
Suggested Input:
Link Inside Diameter : .25 The measurement of the inside width
of a link. The inside hieght is fixed
at 0.5 for easy connection of links.
A diagram further down in this text
shows the measurement.
Metal Radius : .1 The radius of the wire used to make
the link.
Structure (Straight/Arc) : Build linear or circular chain.
Strt-> Number of Links : 3 "1" link will create just an object.
More links will also create a composite
which contains multiple links.
Arc-> Arc Method (Links/Radius): Specify as number of links and the
program figures out how large to make
the cirular chain -or- specify how
large circular chain is and the program
figures out how many links are needed.
Arc-> Number of Links/360 deg. : 8 How many 1 unit links make up the
or circular chain.
Arc-> Arc Radius : 1.2 How large is the circular chain.
---
/ ___ \
/ / \ \
/ / \ \
| | | |
| | | |
| | LinkID| |
| | +-----+ |
| | | |
| | | |
| | | |
\ \ / /
\ \-----/ /
\_______/
Output Files:
CHAIN.INC - An include file defining the chain and its texture.
To change the attributes of the object across all frames,
simply modify this file.
CHAIN.POV - A whole scene definition displaying the output CHAIN.
This includes a fixed view point, light source,
checkered floor, and the placement of the chain.
Application Notes:
As described earlier, the size of a link is determined by the
inside measurements. Thats how a chain really works. It doesn't
matter how high or thick the links are, just how big the holes are.
That works out great for us so we can change the thickness of the metal
without recalculating anything. The inside hieght is fixed at 0.5.
Obviously you can scale it silly later. For placements sake we can say
that the links origin is at its center and is 1 unit in overall hieght.
Therefore, 3 links would be at -1, 0, and 1 in the Y.
For more than one link, the origin of the chain is also at its
center. In this case, I rotate the odd links 90 degrees (so they fit
together) and alternate the colour between links. In the display
section the chain is twisted a bit to show a nice profile.
Like all of my programs, try whatever values you want and see what
comes out. LinkID values under 0.5 are OK. LinkID=0.5 just gives you a
torus. LinkIDs over 0.5 look funky.
NOTE: At this time there appears to be a bug in POVRay. When I
intersect a torus with a plane (to get a half torus), an infinitely
thin burr appears at the cut.
Additional bother:
See also SPRING12 (which generates animated spring scenes), SHADE12
(which generates pleated lamp shades), DIAMOND (which generates a cut
gem, plus creates the rest of the .DAT file: view, light, floor),
GEAR13 (guess), STAR12 (which generates 3D stars with several
attributes), FONT2DAT (which converts Grasp/Pictor/compatible fonts to
objects using many options), and SHP2DKB (which should become SHP2PV)
which takes AutoCad .SHP font files and generates stroke-type font
objects. With all of these programs, just play around with the
variables to generate new shapes. For example, generating many long
points on the star looks like the spokes of a bicycle wheel. Many
short points on a large radius star looks like a circular saw blade.
Use your imagination and please post any ideas or neat works (with
source) for the world to enjoy.
Trial size soap box: Please include source when sending programs
or objects. Even if its sloppy, it can only help others. Follow the
lead of the people who brought us DKB in the first place. We wouldn't
have a POVRay now otherwise! Many thanks to those who do post!
I can be reached at YOU CAN CALL ME RAY RBBS (708) 358-5611. Now 9600!
"Its my world and you're welcome to it".
Ken Koehler (8-26-92)
CIS 72740,1161
Enclosed are three files:
CHAIN11.BAS Quickbasic source
CHAIN11.DOC This file